let random = 0;
let randomC = 0;
let num = 10000;
for (var i = 0; i < num; i++) {

    let a = Math.floor(Math.random() * 101)
    let b = Math.floor(Math.random() * 101)
    let c = Math.floor(Math.random() * 2 +1)
    if (a > b) {
        random++
    }
    if(c===2){
        randomC ++
    }
}
console.log(random/num*100+'%');
console.log(randomC/num*100+'%');


